package com.huzz.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.huzz.entity.SysDepartment;
import com.huzz.model.SysDepartmentCreateModel;
import com.huzz.model.SysDepartmentQueryModel;
import com.huzz.model.SysDepartmentUpdateModel;
import com.huzz.vo.SysDepartmentVO;
import com.huzz.util.body.DataBox;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
* 系统部门-业务模块接口
*
* @author 童年的纸飞机
* @since 2023-06-07 11:25
*/
public interface ISysDepartmentService extends IService<SysDepartment> {

    /**
     * 根据进行ID查询SysDepartment
     * @param id
     * @return
     */
    SysDepartment getSysDepartmentById(Integer id);

    /**
     * 新增SysDepartment
     * @param model
     * @return
     */
    boolean createSysDepartment(SysDepartmentCreateModel model);

    /**
     * 更新SysDepartment
     * @param model
     * @return
     */
    boolean updateSysDepartment(SysDepartmentUpdateModel model);

    /**
     * 根据ID进行删除SysDepartment
     * @param id
     * @return
     */
    boolean deleteSysDepartmentById(Integer id);

    /**
     * 查询SysDepartment列表
     *
     * @param model
     * @return
     */
    List<SysDepartmentVO> selectSysDepartmentList(SysDepartmentQueryModel model);

    /**
     * 导出SysDepartment列表
     * @param request
     * @param response
     * @param model
     * @return
     */
    void exportSysDepartmentExcel(HttpServletRequest request, HttpServletResponse response, SysDepartmentQueryModel model);

    /**
     * 批量编辑SysDepartment
     * @param modelList
     * @return
     */
    DataBox<String> updateSysDepartmentByList(List<SysDepartmentUpdateModel> modelList);

    /**
     * 批量删除
     * @param ids
     * @return
     */
    DataBox<String> deleteSysDepartmentByIds(List<Integer> ids);

    /**
     * 查询SysDepartment树
     * @param model
     * @return
     */
    List<SysDepartmentVO> selectSysDepartmentTree(SysDepartmentQueryModel model);
}